Updated to support pbs-api-cache
Tests fixed
New exceptions are thrown, backward incompatible
New input params for response code, backward incompatible