further work on serialization and reducing app code size