TrimForm fixes

Fixes #29
Fixes #30