Add tests and description about format functions