Changes as requested for pull request

Have implement your comments ...think I got them all.
Will do test cases once I get some time!!