The query workspace component is currently very bulky. Refactor the code into separate component files and improve documentation.