More renaming and moving code around.