Fix and implement new tests