Make code more organized for examples