Lookup 'invoke correctly
Add serializing 'counts' from core
Serialize types from core
Serialize all state after emitting core main
Added 'deftype'