adding // No direct access
defined('_JEXEC') or die('Restricted access'); to some files