In the qusestion bank 4.0 project, a lot of very old code was moved into new plugins, and improved a lot. And, the new API for those plugins interacting with te core question system is pretty nice.
However, the API for other bits of code wanting to inteact with the question bank was not sorted out. We need a proper API there.
For example, when certain core functionality moved into a plugin (e.g. qbank_preview) we ended up with core code having to call a helper in that plugin, to get the preview URL for a question. This violates Moodle's principles on https://docs.moodle.org/dev/Communication_Between_Components. qbank_customfields is another problem (see MDL-72752).