writing custom libraries.

I just spent a whole bunch of time importing Morse.cpp and Morse.h into new tabs of a sketch called Morse.ino and the whole system got confused.

We can't help you until you do a better job of explaining "the whole system got confused".

Generally, .cpp and .h files can be added to tabs in the IDE, and edited there. When the project is saved, the .cpp and .h files will also be saved.

When the development is complete, then is the time to move (NOT copy) the files to a directory in the libraries folder. Change the sketch to use different symbols around the name in the #include statements, and the code should compile and link with no problems.