Fixed main functions for apps
Merge pull request #9 from dmedov/dev_linux

Fixed main functions for apps