Responsive UI while fetching data.

The UI is now responsice during queries and processing. Still work to be
done to make it faster.