Create session outside of business logic (#20)

The session and its error handling is managed outside the code that uses
the session. As sessions are closed after being used, which is
currently always after a single transaction, the code looks strange (see
issue #25).
Fix merge using ours
Show message when no exercises exist (#23)