Code cleanup
Fixed issue #8