Refactored tab load functionality.