Can both of these well known settings be extracted into functions?