Some style updates based on PR feedback

Got rid of the BufferedWriter after being informed that `print!` is
buffered. It's almost impercetibly slower, but looks so much nicer that
it's worth it. Also switched to using iterators in the context
constructor.