Refactor/generify.