minor cleanup and added random and secure random providers