changed backapp implementation to use a class. Vm and Cache are exposed as window globals