Database editing now working