I did that originally but had issues with it, hence the global app object.