Got everything working except the Edit function. It's not passing the correct keys to the edit function.