Some changes to use BaseApp with 'this'