Fix up tests to match updated API.

Decided not to rename ProgramEntry as it's very, very buried everywhere.
Also, the distinction between the database 'Program' and the object
'ProgramEntry' might be helpful.

Next steps:
1) Make sure the tests are still useful
2) Verify (via tests) the API works
3) Update references in other files to new API