update reader to new format. make everything pass JSlint