refactoring, util method registerAndExecute

Change-Id: I8f57b09e9da5c475780ac4135a282b7a7da17bca
removed requirejs bower dependency, we are using a CDN for loading it

Change-Id: Idd0604831813988dce609687b94b33c4ede92b5e