(js) Modified the app obj to support inheritance