On the torus theorem and its applications