Not refactored code.
Refactoring and add test gui