Merge pull request #229 from Alexpux/develop

Implement "--mode" switch