This needs to go into a lib module.