Moved grid and center utils to graphics.js