Added trim to boundary validation. Fixes #60.