Ajax loading and scrolling

with history.js for updating url
Also moved footer to template.