Added margin control, changed sin and cosine formatting, threw in some commented code about formatting in E&M section.