Updated to latest code