Merging, Refactoring and integration

Merging, Refactoring and enhance the logic and integrate all mobile
parts together