Minor cleanup, implement settings and session management (reset, restart)