Removing unused methods from Document