Move portDB attrs to loop() local vars.

Part of the reason I put those in the struct was to facilitate testing.