Marshalling

Marshal implementation for primitive data types. Writing and loading from file works as well.

I left a few todos in there because they are not that obvious like e.g. missing functions.