Rewrote default handler to use functions instead of a class + fixes