moved private app code into its own module