Refactored everything into own methods