Mostly adding debugging statements to the new database calls.