Added ks function and removed unnecessary functions + tweaked some values