Added changes due to new javascript and services refactoring