V4.2  Update to format and Orient function

-Change made to the orient function so that use unsigned behaviour to
make it easier to understand
-standardized formatting across files
-buildable, not tested