Import of working icw checker. Mostly based on synfrag code.