Calculating of cells centers

Program can calculate coordinates of center of cell. Bugs fixed.