Fixed misc bugs related to status of files
Improvements in diff