removes unnecessary stubs