changed: made genID more expressive; fixed: callback statements (callback && typeof callback === 'function' are basically the same statement)