added mechanism for retrieving URLs based on app installation mode
major api namespace refatoring
api support helper methods encapsulated on its own namespace
fixed api events obsolete docs
fixed api vars naming