refactoring
finished ts server first demo version, close #3