Added basic_opt method that runs remove_fours and remove_undos until nothing changes.