factor out xml garbage
more xml cleanup
factor out batik bit
major refactoring to cleanup the mess