Fix class constructor, update test