split ast flattening from render module
linting
add flattening module to makefile dependencies
remove now superfluous code