Added comments and removed some unneeded things.