Part of #102 - buttons fix.

"Next"/"previous" buttons did not work.
Fixes #118 (Exception when

clicking "Solutions without reviews" on local build)
Adjustments according to pep8 (part of #118).
Merge pull request #138 from egor83/master

Further fix to #102