Code rewrite for ADTReader