cleanup logic and strip file name as was done previously
remove unfinished support for single-quotes
I hate indentation
remove unused variable