Refactoring so that LongData specific stuff goes into package longdata