add rest_app and modify some models