Complete reorganisation of core.
Lots of changes