Added panning. Still buggy.