Don't throw exceptions from destructors
Trim whitespace from all of the style fields when parsing. Closes #1565.