Make the library a bit more generic