Fixing data connections to new database and layout changes