Refactored; unloading from memory not working.