Part 1: Made changes according to Michael's suggestions

Made some sytlistic and design changes to the code
based on Michael's suggestions.