As previously discussed in #29, improving tests and reducing code repetition is increasingly necessary.