Closing issues 18,27,29

Please merge the pull requests for closing the above mentioned issues