Further cleaning
Changed file reading API