Improve horzcat and vertcat to support matrices