Cleaning up M-M pivot database code.
Hoping this may fix a problem with some values not saving