add AnalyzeFile
add docs to AnalyzeFile & cleanup smells