Fix various centering bugs. Add set debug class.