Fixed a bug in triangle wave. Removed some old comments. Not sure exactly what to comment because most seems self-commented