Fully working, except for final code generation