Removing string comparison from controllers