Refactoring and bugfixes

Bugfix - explain plan is working again
Bugfix - display cursor is working again
Application no longer crashes when running commands continuously with
display execution plan and statistics
Known issue - "in-transaction" resolving requires one extra command
within user session which is visible in statistics