lode.unload implementation and tests