modules: get rid of `table.remove`