Refactored all the things