in progress work for better supporting multisite
makes php object a singleton, adds better enqueueing of scripts and support for multisite