Added correct HTTP status codes
Fixed a minor issue that was causing time_based tickets to be created when specifying an invalid policy
Added contexts documentation and updated to changes in error codes