Handle includes better and format generated code