fixed inconsistent commenting and removed extra lines at end