Refactoring + tests
Adding Batik backend as an option