Added tests and some additional exports.