Optos and testing and removed dead code