e2e: implement init()

also add e2e globals variable