Minor reduction of code duplication
Minor code reduction
Removed some code duplication.
Merge pull request #45 from Ed-von-Schleck/cleanup_03

Minor cleanups