Refactored scripts to use the fluent api
Added event triggering to scripts