Finish refactoring
Resolve merge conflict