Abstract common app code