First pass at optimizer code
...