added wireframe mode and event listeners