Fixed compatibility with history.ajax.js, reformated.