GUI changed + small refactoring made