Refactored captain script events into nice function-style labels