fixed enum
replace unsigned long with unsigned int
add icon
fixed warning.
clean up code
update tests