fixed dependencies in mxn_diagram, modified database interaction
tests updated