Collision detection finally working. There is a little hack to make it work but I'm not going to worry about it too much.
removed TODO comment