Towards refactoring