Minimization

Collapsed into one main class.