added document
adding document
renamed document to element
cleaned up element
separated types.h