Rearranged database relations and field names.