rationalise directories on all machines; improve utility of app() function