Changed folding method
Add definitions for tab settings