Fixes some NoClassDefFoundErrors introduced in latest commits. Fixes tests.