Converted icontypes to enum; cleaned up more code