Added clear_buffer function and finished segregated attribute value insertion