Finished error logger
Clean-up models after tabs are closed