Pull request for "Fix for Issue #1 and some other enhancements"

Some minor changes to Pull request #2 : Fix for Issue #1 and some other enhancements.
Thank you for your contribution!
(... and sorry for the slow reaction)