Added Catch based unit test project for xcode, tidied up source and updated doc