Rubocop

This pull request set a small set of cops and clean some basic lint/style problems. There are still work to do regarding cleaning and tweaking the Rubocop configuration but this can be an starting point.

Issue #509