Enable and fix all the existing tests, devise some new ones