Feature/length limits

Resolves #1133