Rearranged functions.
Removed (require 's) because it was not used for more than one
function. Added (require 'cl-lib).