Little bit of refactoring. Remove some logging.