Added E2 tests and boilerplate scheduling code