This is a first pass are removing some of the code smells. Many reported code smells were ignored in this effort