Rewrite collision detection

Now you fall down when you walk of the platform, and you should not be
able to walk through walls anymore.