Refactoring + comments