Added session saving
Fixed tab handling