Creating a configurable constructor function for a whole library