General refactoring;