Some notes on refactoring