Refactoring + issue #1