Refactored stylus build