Update headers for rand()
Tidy up headers