Took out wireframe for now, meshes apparently need a texture applied in order for it to allow you to change the texture dynamically. Now space bar works as intended.