Fixed warnings and duplicate php includes