Initial support for multiple environments

Addresses #105 - multiple environment support - ready for initial feedback.