Little bit more refactoring. Added to_buffer implementation of response.