Fix syntax issues with RuboCop

Use RuboCop to comply with Ruby style guide. Some issues left to fix that need refactoring (for instance initialize methods too long)