Huge bugfix & more stuff

Debugged geometry stuff, done other stuff