InputStream buffer optimization, manifest cleanup