Updated CodeGenerator to v0.8.1

integrated api
cleaned up code