General cleanup and fixed Issue #3.