undo feature + bug fixes