Fixed stupid d_name error. Also implemented add_block