Fixed angle simplification in Direction.
Using modulus for remainders.
Removed some debug code.
Added correction for uncalled invokeShift.