Fixed misc violations from scrutinizer report