CS and few scrutinizer issues fixes