core: allow method name be same as class name (issue #15)