Added persisting of entities.
Edited/Removed old stuff.