cleaned up main navtabs code