merging after refactoring
Merge branch 'milestone6' of github.com:WSO2Mobile/mdm into milestone6