WIP at convention
Fixing reverse variable assign bug in orientation detection
Finishing fixes for orientation