remove invalid type hinting and cleanup namespaces a bit