Improved API

Better API for Editor
- store, restore state
- get/set properties
Fixed restore mode Source Editor
Some more restore bug fixes