Tighten pre-conditions and add exceptions.