update resultset api to consistently use toarray, nesting as necessary
current progress with unit tests -- now onto result sets
updated resultset api to be more testable and separated