Remove old code
Improve environment config