refactoring ajax without reloading page, yield :head added, title updated