First, your library is multiple items, including media files, and the critical library.itl file which is what is really your "library". You do not change your library's location through iTunes preferences settings. You change it by copying the whole iTunes folder to a new location, then starting iTunes with the option key held down and guiding it to that location.
So, backing up, what exactly have you done? I suspect you did it with preferences which means from the point where you changed them to the external iTunes started storing only media files there but left the rest of your library on the internal drive. If you changed preferences back to the internal drive iTunes starting storing anything new on the internal drive but left old stuff where you had it at the time preferences were pointing to the external drive. If you want all media now on the internal you will have to organize (used to be called consolidate) when changing media location in preferences.
What are the iTunes library files? - http://support.apple.com/kb/HT1660
More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
Where are my iTunes files located? - http://support.apple.com/kb/ht1391
What not to do: iTunes for Mac: Moving your iTunes Media folder - http://support.apple.com/kb/HT1449
Something along the lines of what should have been done (but it's hard to follow). iTunes: How to move [or copy] your music [library] to a new computer [or another drive] - http://support.apple.com/kb/HT4527 - a somewhat bewildering and not always easily understandable set of options.