tuning maxKeyLength and cleaning comments