PM: move demo code inline for documentation