Switch from tabs to spaces.
Break normalized string creation into a function for easier testing.