Added support for custom environments
Added a fallback feature and refactored some code to be more SOLID.
Getting close to a iceberg anti-pattern though.