added some debugging clases and tests, several fixes, works, but not perfect yet