Added test/demo for autodetection