First attempt at orderinversion
Fix tabs -> spaces
Some tests for order inversion