fixed php warnings and autoloader