Modified parsing for xml header. Added first draft of tests for NewClient()