First version of the handler. Need to tweak a few things, clean the code and add some execution information.