Fix typo in findByIdP function
Add rudimentary tests and fix idiot mistakes