VE-646 Switch approaches from using incremented ID to using temporary filename as identifier, move logic into model method