Made the method parser a bit more flexible.