Minor code cleanup
Added python code generator as an example