Finish refactoring dev