added code to import files, and also some cleanup