Fix library usage and export