Add structures for ts, pes, psi and so on

Copy from my other projects, develop based on this