Making usable as a library