tidied unused code in doc