Improved code for the fields dependencies in the back-end