Removed common classes

Removed common classes and moved them to TsCommon. Added depenedency to
TsCommon
Bug fixes and tests