change app architecture to be more generic.