More improvements to the bonus, including custom functions.