mid-refactor
Major refactor