Added basic support for method invoking.