Added some preliminary serialisation tests and moved sources.