Refactoring of readAndCalculate
- internal operations replaced by other methods
- no tests needed because readAndCalculate method was tested already
- renaming variables
- add comments