Changed logging and cleaning up code in user-facing iface
Improved state interface. Local deployment mode available. Enhance logging infrastructure.