Fixed autoload, namespaces and php errors