Organize functions, add deterministic addresses