minor cleanup and updates to aid testing