Improve usability as a library