Major refactor ended