Refactor to make more angular-y.