Basic implementation to organizing sorting of tabs

Not implemented into real javascript