Removed logs and refactor