Moved collision detection to seprate class

Collision detection moved to different class. More changes foolwing