Using Criteria instead of JPQL. Closes #6.