Changes to correctly test logic and to organize code.
Changed Credit reduction script and client credit amount update script.(LEV-71)