Fixed code climate issues