Fixed issue with append_elements adding only to first column

prepend_elements logic was correct, however append_elements should look
for the column with the lowest number of elements. append_elements was
always returning 0. This now allows you to prepend_elements to an empty
container.