cleaned up exports.validate, exports.map, exports.add