moved base parser to it's own file, added better debugging