Corrected formatting. TODO: need to remove some commented code lines that are not needed.