code cleanup
add tests for $\n indentation