reduce boilerplate code, fix test dependencies