Invariant generation working
Clean up
Clean up and bug fix
Clean up
Bug fix