fix model initialization & serialization
add basic patch architecture
refactor datatype tests