Adds QUnit tests and fixes inconsistencies with CRUD.