Refactoring some controller methods. Slightly less confusing to read now