Cleaned the code and changed to more easily understandable variable names.