Moved the three space definitions to one place
Improved the debug outputs added initial grabbing of the rotation