Better piece location and creation; also improved resize code