Second round of refactoring.

Pretty much completed the architectural changes. Just some minor things left to address (i.e. passing a data structure to CLR, flag to allow coordinate system choice, rename Monolith etc.)

Note: This commit is currently broken (only in the last return call) but this is easily fixed. The conversion pipeline everywhere else is working fine.