Start of Stylus grabbing code