Add a test for OptimizeIL

More to come, I promise.
More optimize IL tests
Cleanup for readability