added app before the rest resources so that pages have more flexability
Changed the javascript to use JQuery