Added lots of debugging stuff. However, can't get rotation at the poles working.