Massive update, add some database functionality and closing tabs
Rename notes to pages