Fix variables, add newlines to output