Fix messages being uninstantiable by json
Fix registration