Artur's changes: added greedy algorithm, modified GUI and fixed some bugs