Add some edit functionality, needs improvements