Refactor Response class and tests