checkpoint major restructuring

- Restructure code to be generalized for all C-like languages
- enable emitting only the code that is used