Helper functions; removed unneeded example code