messing with parser

- from main, push the template encounter object over between files (by
using the reference)
- changed the parser to make more sense: now it loads numbers just fine,
instead of the digit-by-digit stupidity of before

For some reason I didn't know this was the logic way to do it. I halted
when I didn't know how to convert a char array into an actual int, and
so I realized that I could load the int directly from the stream. Heh.