Some painful migration of code