fixes & additions to validation; partial rewrite of object serialization