Backport of MorphlineDemo.java from kite-sdk