Clean up the code and fix a WHO bug