Made rewire optional and fixed rendering bug.