Fixes #42 by restoring the feature that was stupidly removed for #41 (and provides some additional features)