Now some classes are public.
Moved some code.
Code reorganization