Fixing accessible category list when checking from same URL and cleaning some of the old code from Joomla! 1.5