Restructures stylus output