Improve codegen and add an interpereter