Moved helpers to separate file, added support for runtime change of exported variable.