Updated demo to use classes so as to be multipurposed.