Small amount of refactoring