refactor actions a bit so variables are not directly exposed to biz logic.