Tweaked data storing in query interface, misc TODOs