Set up local logic.