(bug 4062) Refactor code to remove indent