clean up main and menu funcs