[BugFix] #548 and #728 + cleanup of unused files.
Merge pull request #771 from MichaelKalygin/bugfix548+728

[BugFix] #548 and #728 + cleanup of unused files.