Limits name length to 30 bytes

What it says on the tin. Let me know if there any issues with these changes.
I'd just compare char-based length here. Different characters can have different byte lengths.