Added a few tests, DRY'd out some PG ENUM code