Refactor to reduce actions carried out by each method