Better AJAX integration. Added history.pushState for back-button support.