Added code to handle wireframe and local axis visibility