One of the most useful, effective, and melodic devices to employ when improvising over songs is to quote the melody of the tune. Out of all the fancy techniques available to you, melodies are what stick in the listeners mind and convey passion and emotion. When you quote the melody of the song, elaborate and expand your ideas, you are no longer playing phrases that have nothing to do with the composition at hand. Each phrase that you play should have some direct relationship to the preceding phrase and create coherence in your solos.
Does this concept only apply to jazz? The answer is a resounding "no". You can quote the melodies of pop, rock, funk or any other styles of music. Once you internalize these melodies and make an emotional connection to them, they become a part of you and your melodic vocabulary.
A great exercise to incorporate into your practice routine is to practice quoting the beginning portion of the song's melody, and then ending your phrase with an improvised idea. This concept applies to both the verse and chorus of songs.
An excellent example of quoting the melody of songs can be heard in the bass solo of the tune "The Distance Between Us" from fusion guitarist B.D. Lenz's album "Manifesto." The entire melody of the song is in the key of A minor and has quite a few melodic variations. Each phrase variation provides both an opportunity and an idea for the soloist to quote from and further elaborate. Although the bass solo is in the key of C minor, I simply transposed the initial melody of the tune that was originally in the key of A minor, and used it as a "send-off." Each melodic idea is further elaborated and built upon.
I took the same opportunity to use different phrases from the melody and transpose them to the key of the moment when the key changes of e minor to c# minor occurred during the solo.
Quoting melodies of tunes provide a wealth of ideas to build from. Your solos will immediately begin to sound more mature, cohesive and in context.