refactor identicon.php to a class