More refactoring, fix a bug about reloading the table after coming back