General refactoring 2