Increasing test coverage and fixing bugs found while writing tests

Minor nitpick: `num_feats` should be moved in a space here.