Improves encoding, tests, globals