Updated code all around.