Added distance method
Added proper methods for getting collision rectangle. Made sure the collision detection algorithm uses that. Fixed tests.