Added check_input where missing and changed get_c_declare and get_c_extract.