Fix some non-rubyisims
Fix usage of KS when it was removed