Bullet-proofing the code