Removed unnecessary code and fixed the doc.