replaced Handler struct with class for Rails compatibility