APD-721 Fixed some high rated Sonar Issues for JS