Small adjustments to functions