Remove unused code; move helper to partial view
Fix bug from cleanup