Implements #80
@JMLX if this is acceptable, as last time I'll rebase in one commit and remove the change in Cargo.lock