Cleaned up trigger and service class. Added test methods.