Add and fix tests