Application API improvement

Newly created application object will be returned after creation
Merge pull request #198 from xt99/master

Application API improvement