cleanup edit

fixed some backend stuff, even though the front still doesn't work...