Add missing exports and fix tests