Restructured collision detection. Not good yet.