Partial working tab feature

Includes fixes in database classes
To do - delete tab