Gravity: Minor bug fix and optimizations

-Fixed A bug On Level 49 with objects able to pass through the wall behind the exit -Minor optimizations