added REST Interface, refactored save/load functions