added bcf_clear() when obtaining unused bcf records from writer
debug changes
misc. changes