More purity when handling events