Added references
Finally starting to understand sample decoding algorithm
Added Tenant code for PHP port