code review and hardening