Framework for piece centering added

As near as I can tell, I moved a whole bunch of stuff and it still
works. fingers crossed