Improved movement/collision detection