Fixed minor bugs
Polishing classes
Code refactoring
Code refactoring