Cleanup, indentation and docblocks.