Fix db index name in migration file
Refactor some files
Move some widget files