Included listfile support for inserting new files, cleaned code