added links to the profiles in the profile/container view
removed cruft
tidied up the switching of profiles based on the version
default to sorting by column 1 if the column 0 is an expando column