add history mechanism for undo
add history css
fix undo feature