fix imports and inline the isProxyClass implementation