Andrew/David added application context support.