moved read_idcode()
cleanup
cleanup