added tab state saving
removed unused methods