Added some more unit tests and attempting to fix null response issue