Moving categories into functions.