various clean ups + trying K-S test instead of KDE