Adds rubocop and changes codes to pass

@azevedo-252 please end the code review