Removes unnecessary stubs