add some animation to #main hide
fix edit view
rewrite in plain js. rename study.db => database.db