Code cleanup for methods.R.