Tests, fixes, debug