Setup as a library