cleaned up code, remove console.logs and fixed spacing issues.