Adding fixes for Issue #20 and initial commit for issue #19