Solved a problem parsing spaces in environments. I think it is a pretty bad practice to include spaces before command/environment arguments. However, it was pointed out that this is correct LaTeX and we must support it.