added some validation on teh URL and changed post objects to be hashes instead of structs.