Refactored for thinner controllers