Allow dashes in subject id
Refactor device edit