Added new function findSeparatorSize that just returns the size of the separator (rather than the actual separator as in findSeparator). Using this in the cost function greatly improves runtime (previously cost took about 90% of the running time, now it is about 40%).