Removed delayed extraction
Added the callbacks
Enveloped the code into a module