Small code changes and cleanup.
Fixed Issue #30