Removed console.log statments everywhere. Updated a few to console.error
Added documentation