Put logic for collision detection in collision.c, increasing readabillity of code.