Added changes for new structure which will allow modern JS frameworks to play well.