Fixed unit test and some formatting errors.