Reimplemented Collision Detection

It's almost there! Just need to tweak a few bits of logic and this
should work beautifully.