Minor code optimization
Check class duplication.
Improve Main class