Prettify

Change indentation, added comments and change variable name to be more
intuitive