Everything should work as is intended.  Please see comments for
questions about some aspects of this impelementation.
updated some of the code.  Read comments
Trying to figure out the content type for the currently selected item is the problem.  Any help or suggestions is appriciated.
moved all the show/hidding of row elements to one function.  Still trying to figure out how excecute the proper code inside of the new function, according to the preferences that have been passed in.
this commit should fix the branch.