Square wave generator finished and cleanup