Some refactoring trying