Added some comments and fixed spacing