Updated demo to reflect updates on afterFunc