Little bit of refactoring