Fixed #247
Fixed #797
Removed stupid logging
Fixed #798
Fixed #793
Merge pull request #842 from dvvrd/fix247

Fixed #247
Merge pull request #843 from dvvrd/fix797

Fixed #797
Merge pull request #844 from dvvrd/fix798

Fixed #798
Merge pull request #846 from dvvrd/fix793

Fixed #793
Merge branch 'robots' of github.com:dvvrd/qreal into subprograms
Some fixes caused aseertation faults
Small refactoring: something migrated into view/private