Cleaner solution to REST issue.