over haul of structure, tabs are now working and most functionality is present