structure and simplify some new scan / format library parts