added a maximum buffer size of 16 MB for import, and removed some unused code