Refactored stylus