adding missing functions
refactoring
refactoring
Merge branch 'mdm-dev' of https://github.com/WSO2Mobile/mdm into mdm-dev