Demo-time final version of code.