Fix some bugs, support passing in ultimate destination so it's not hardcoded.