Fixed features and added bugs in ed