Cleanup of get_input_fields