Some improved but still very poor code.