Fixes #5912 Removing UI code + refactor out the un-needed parameter to function `$parseToHost`