remove unused imports
tidy up "__exit__" method for "ParserWrapper"
fix possible import error or "profile" decorator