Fixing implicits and tests