A bit of refactoring and proof of concept