Move most utilities to an external library (php-util).