Fixed binding of handler in main so that it actually grabs the handler
function. Derp.