Lots of fixes to the parser. Fix to attributes string splicing