Rename of db tables and fields

Code to match