Made modifications to address problems/suggestions for code