Merged handler into main file

Handler was not really needed, and so its functions moved into the main
tasks file for simplicity and clairty.