Tests and implementation.