tab closing fully implemented

some bugs while restarting mainActivity, remembers the last path in some
cases, and loads list rewriting the database values