Moved handler funcs to the bottom of the file.