Change the return type of many common functions from int to bool.