BROKEN CODE. Small additions regarding panning.