Code clean-up in getCenterPoint().
Works with m-dim arrays now, code compressed and cleaned.