Remove some debug stuff
Added 3D support