Some refactoring complete