Refactor Morse utilities to morse.c