Add field with close timestamp to the Thread class
Move plugins' dependences into their classes