Moved code around.