optimization and debug info cleanup in procamscan