Fixing issue #44

This finished issue #44, except for maybe some documentation