master
A bit of refactoring