house-keeping and refactoring