Inital refactor