More bug fixes and foundations

Foundations for a new way of saving settings and new session length
control. Bug fixes are fixes #10