Remove static_cast in box/center and add missing includes