Improved result set formatting