fix build.xml error when building, make parser take options object, code cleanup