Adding structure to document