Massive design refactor
Merge branch 'master' into production