Added SLF4J to tests
Improved tests and various bug fixes