Added backward compatibility for PHP 5.4.
Added root constants.
Changed some styles.