Updated the library to include a initialisation function