PHP 021 and some other cleanup