remove unnecessay mkdir
refactor
remove unused empty file
fix bad regex
clean up output and code