refactored small things