Add unload and some other cleanup