removes unneeded optional specifiers