Migrated toolbox to a separate page
added state service to control whether in edit or preview mode
Some reorganization