Cleaned up code and deleted console.logs