* clamp more parameters, tidy and refactor * fix a bad thing * typo Co-authored-by: ezra buchla <emb@catfact.net>