Add categorization flag and make end to end working.