Clamps the SLEEP duration to account for ~magic~!
Also adds a few useful exports.