fixed many sonar issues #87