Added postfixing and inversion logic and test framework.