Fixed issue #13
Fixed issue #14
Fixed issue #15
Improved code coverage,unit tests