Cleaned up parsing of styles.