Added more query functions.
Fixed target select mechanics.
Target selection now working.
Fetching category text from db, but category inputs not working yet.