Implemented better way to handle extension method invocations.