hopefully appends new features now...
removes extra last lines
fixes typo and hopefully reorgs sed properly for sub-append
adds commented original prepend