Sonar cleanup and remove duplicate code

Removed some duplicate code and cleaned up some sonar issues.

Issue-ID: POLICY-2242
Change-Id: I374c263516d87bda66442ed65cae9cc056e68e56
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2 files changed