Try to remove whitespace when they are indentation

The code for this is quite ugly at the moment. I need to figure out a
better solution.