Some internal refactoring

* Method simplification
* Code checking with rubocop
* Coverage checking with mutant