Added comments, removed unneeded portions