Working on unload functionality.
more work on callbacks