120814 Added main class. Refactoring.
120814 Little changes