Removes console logs and refactors