implemented Swing interface and added log library
also refactored part of code