Added comments and minor things