Fixes rotation and adds collision detection