Added support for arbitrarty methods, static methods and functions.