Added string res, fixed variable names, added instance of AppController on FormActivity.