Add support for saving state of levels.
closes #74.