Fixed editing cancellation and removed commented code