This code has been cleaned and reintroduced elsewhere.