Added EnvironmentSettings + fixes for encoding/decoding + other small improvements