category data is now added to the output; ruby 1.9.x/1.8.x compatibility; minor bug fix