Changed where the key is generated and added display for prod vs local