Cleaned up example code