Move application stuff to base.

Change-Id: Ic0b0c8c035d2ba5c898798232f32bbab26a6652e