Moved constants into sample code function.