Fixed formatting errors and missing code.