Added comments and cleaned some of the code. Have fun