cleaned up unneeded email variable and added lots of documentation