adds a note on an optimization that can be made when a validation bug is fixed in farscape-server.
bullet proof header retrieval.
improve organization by refactoring some deeply nested code.
add a todo indicating that duplicates are not handled.
try to disambiguate queryForNames and queryForInstances.
don't worry about the session when closing.
move util method to util class.
added comment about side-effect.