First refactoring, more to come...