clean up code and fix bug in WikiRevisionInputFormat