Cleaning Up CFile

Incorporating the changes in PR #2596 
Sure.