Add MethodThread class.