I built a simple Morse Code program - in need of optimisation

This is strangely familiar.

https://forum.arduino.cc/index.php?topic=510010.0