Massive refactorig; split up core models