Fixed pitchlock bug.  Also added a helper function to reset the ship's orientation to 0,0,0 and an API to add custom functions to the 'tick' function.