Set typename in any case
Added support for static methods