cleaned up code and fixed untested bugs
filtered .write-ethno-codes to admins only