indentation and code generation improvements