Add in better type support and more logging.