fix parser to handle leading whitespace; adjust styles