Some scaffolding, added lots of datatypes and implemented loading, also
some refactoring