fix requirejs config and event listeners
use manifestURL to find out the app