Removed extra main methods from gui for easier merge.