Increased Test Coverage and Reduced Sonar Violations

Oops just saw these comments after I pushed...checking it out now.