Added better Z ordering, and added support for collision detection

around the edges of the level