This just refactors the existing code, so I think it's ok.