Samarth

its a big pull request and will invite a lot of comments. 
Pls dont send any more merge pull request to master and try to get this merged first, as it will cause more conflicts. 
Request all to review and provide comments.