Simple constification (needed by the match compiler)
Match compiler: Turn code into a python class

This will make passing around internal states a lot easier
Match compiler: Cosmetic changes after running pylint