Separated out example code.

Separated out example code into separate file.