Moved handlers out into separate file.