added codenarc, lots of tests for Document module