This way the executable code can be worked with directly, instead of via the python file that generates the rust code. Also introduced some small optimizations.