improved io.jl and added addcomments.jl
tweaks to addcomments
fixed errors in string formatting and updated generate.py