Began serialization routines. Fixed bug causing variable/function registration to fail.