Tomita's Theory of Modular Hilbert Algebras and its Applications