Refactored - took out some of the obsolete console logs.