Refactor a little bit to avoid too much Intent passing around