Removed some junk and cleared unused memory.