changed xmldoc to a class and shifted class-specific methods into their respective classes