Implemented pushState logic for documents