Made changes to increase clarity of code