Refactor configuration to environment keys