improvements to the ApplicationController