formatting
removed debug code
Document is now a trait