Massive design refactor