Make Handler more generic
Refactor Handler to be more functional