Misc changes. Starting refactoring for using .env.