ISSUE #3: Some refactoring