* Replaced regexp for TSS by JSON parser
* Cleaned up code