Slight changes to various functions.