Daniel's changes incorporated into the master