Refactor code, for reset the ActionBar