separate ui code from injected script