Added comments and README. Fixed some formatting