Improved Script reader and its Unit Test