refactored common app stuff to trait