code cleanup for board and rest.