refactor request & responses and improve tests
Merge pull request #1 from zzeni/general_refactor

refactor request & responses and improve tests