Beautify the PNGreader code