Changed index to return json, added global.js and jquery to default layo...

See title.