some code refactoring. gui and algo code splitted to different sections(gui and
algo packages). code formatting fixed, some code added