Further cleaned up example code