persisted data support, bugfix for spawn permission, code cleanup