tidied up private app module code