Added some spaces and some comments to the code