Pull out resultset code for maintainability, defer render until tab is clicked