Created factory for gui, finished basic table events