Refactorize me captain