bunch of parser lib improvements