Fixed issue #16 Remove unused code
Fixed issue #18 Check error