Change signatures and fix tests