added titles and removed/commented out some redundant code