changed clean() to clear()
cleaned comments and code