Better edge collision

Now the collision with edges is better, but I still think the movement
is a bit jerky. The function for checking for collision with the cube is
huge, redundant and extremely specific, so if we can I think we should
change it a bit. However, now the sphere interacts with the cube the way
I wanted it to do, so thats a big leap forward :)