cleanup in MainUI

concerning #170