Added query serialisation support and updated docs