Merge branch 'dev'
Basically finished.
Many things need to fix.
 prepare to add history record
 correct input position.
 add history button
ready for history window