Errors fixes

Fixed errors with namespaces, class names, invalid function calls and others