Full refactor complete