Source code refactoring, merged functionalities typeDiv and typeMod

Sorry about the earlier confusions and dummy pull requests. I am just getting used to the Github pull request mechanism. Please consider only this pull request from my end.