Refactor original and production id acquisition