Slight refactoring and character trigger support

Added support for trigger attribute (#13)
Refactored code to use .data() exclusively, simplifying numerous evaluations throughout the script