Put homomorphism trait in its own file.