cleaned up logging and vApp code