Refactor for neatness