takes arguments properly, writes files properly, comment cleanup