Changes for pull: related to issue #4 and #5

You might want to consider these changes for the upstream repo, they basically implement the proposals made in issues #4 and #5.