rewrite of Parser and Builder

I know this is a bad commit, but most of the code was more worse than this
commit is.