Fix minor issues
Unit tests from utils.php. Related to #5.