Added unittest and complete icann compliant code