DRYed up classes by extending a new class SerializableObject