Almost finished the trignometric simplification. Some issues remain