Just a basic library to handle different complex states with callbacks and cleanup