Refactoring some variables to make them more clear what is going on.