Move example code to class, add various demos