added base implementation of transpiler state
cosmetic changes to be Pep8 compliant