Added references and removed some white space and bad comments =