Implemented GeometryUtils.merge
Added explicit casts in necessary locations