Restored files (after accidental deletion). Now most of the file handling part has been completed.