Added collision detection
Cleaned up global items