Better handling of extending objects and removal of empty lines at end of pasted CSV data