add base application class with convenience method for getting a context.
add preferences class for commonly persisted stuff.